/*-------------------------------------------------------------------------

   File:		isosizes.h
   Project:		VeriFone SoftPay Base
   Description:	Header File for all C files

***************** Modification History ***********************************

$Log: /SoftPay/SPK2SIM/Source/Include/isosizes.h $
 *
**************************************************************************

   Copyright (C) 1999 by VeriFone, Inc.

   All rights reserved.  No part of this software may be reproduced,
   transmitted, transcribed, stored in a retrieval system, or translated
   into any language or computer language, in any form or by any means,
   electronic, mechanical, magnetic, optical, chemical, manual or otherwise,
   without the prior written permission of VeriFone, Inc.

---------------------------------------------------------------------------*/

#ifndef ISOSIZES_DEFINED
#define ISOSIZES_DEFINED

#define ISO8583_FLD_SIZE				256		/* Size for src and dst buffers	*/

#define ISO8583_MTI_SIZE				2		/* Message type identifier size	*/
#define	ISO8583_MERCH_HOST_HEADER_SIZE	16		/* Merchant Host Header size	*/
#define ISO8583_PROC_CODE_SIZE			3		/* Processing Code size			*/
#define	ISO8583_SRV_RESTRIC_SIZE		3		/* Service Restriction Code		*/
#define ISO8583_TX_DATE_TIME_SIZE   	10		/* Transmission Date Time Size	*/
#define ISO8583_CARDACC_NAME_SIZE    	25		/* Card Acceptor Name			*/
#define ISO8583_CARDACC_LOC_SIZE    	40		/* Card Acceptor Location		*/

#define ISO8583_TPDU_SIZE				11       /* Trnsprt protocol data unit	*/
#define ISO8583_TPDU_PACKED_SIZE		5
#define ISO8583_NII_SIZE           		3		/* Network Intl Id				*/
#define ISO8583_AMT_SIZE				12		/* Maximum ISO8583 amount size	*/
#define ISO8583_AUTH_CODE_SIZE      	6		/* Authorization code size		*/
#define ISO8583_MERCH_TYPE_SIZE     	4		/* Merchant Type size			*/
#define ISO8583_RESP_CODE_SIZE			2		/* Response code size			*/
#define ISO8583_ADDRESP_CODE_SIZE		25		/* Additional Response Data Size*/
#define ISO8583_POS_CON_SIZE			2		/* POS Condition Code size		*/

#define ISO8583_TID_SIZE				8		/* Terminal Identification size	*/
#define ISO8583_MID_SIZE     			16		/* Merchant Identifier			*/
#define ISO8583_BANK_ID_SIZE     		11		/* Bank ID size (Field 32)		*/
#define ISO8583_COUNTRY_CODE_SIZE		3		/* Country Code (Field 49)		*/

#define ISO8583_PVT_55_SIZE				10		/* Maxium size of pvt field 55	*/
#define ISO8583_EXT_POS_CON_SIZE		10		/* Extended POS Condition code	*/

  #define ISO8583_PVT_59_SIZE			17		/* Maximum size of pvt field 59	*/
#ifdef INIT
  #define ISO8583_PVT_60_SIZE			400		/* Maximum size of pvt field 60	*/
#else
  #define ISO8583_PVT_60_SIZE			90		/* Maximum size of pvt field 60	*/
#endif	/* INIT */

#define ISO8583_MERCH_DATA_SIZE			100		/* Maxium size of merchant transport data (field 61) */

#define ISO8583_PVT_62_SIZE				100		/* Maxium size of pvt field 62  */
#define ISO8583_PVT_63_SIZE				520

#define ISO8583_POS_EM_SIZE         	3		/* POS Entry Mode size			*/
#define ISO8583_RET_REF_SIZE			12		/* Retrieval reference num size	*/

#ifdef ISO8583_EXTENDED_BITMAP
  #define ISO8583_BIT_MAP_SIZE        	16
  #define ISO8583_BIT_MAP_STRING_SIZE	32
#else
  #define ISO8583_BIT_MAP_SIZE        	 8
  #define ISO8583_BIT_MAP_STRING_SIZE	16
#endif  /* ISO8583_EXTENDED_BITMAP */

#define ISO8583_MTI_STRING_SIZE			4
#define ISO8583_PROC_CODE_STRING_SIZE	6

#ifdef ISO8583_EXTENDED_BITMAP

#define ISO8583_SETTLE_CODE_SIZE		1
#define ISO8583_NETMGN_INFOCODE_SIZE	3
#define ISO8583_TOTAL_ITEMS_SIZE		350
#define ISO8583_ORIGDATA_ELEMENTS_SIZE	42
#define ISO8583_MSG_SECURITYCODE_SIZE	8
#define ISO8583_SETTLE_INSTIDCODE_SIZE	11
#define ISO8583_RECEIV_INSTIDCODE_SIZE	11
#define ISO8583_TRT_DESCRIPTION_SIZE	100
											/* Deluxe Host definition */
#define ISO8583_PVT_111_SIZE			255	/* Maximum Size of Private field 111 */
#define ISO8583_PVT_113_SIZE			11	/* Maximum Size of Private field 113 */
#define ISO8583_PVT_120_SIZE			6	/* Maximum Size of Private field 120 */
#define ISO8583_PVT_122_SIZE			11	/* Maximum Size of Private field 122 */
#define ISO8583_PVT_123_SIZE			50	/* Maximum Size of Private field 123 */
#define ISO8583_PVT_124_SIZE			255	/* Maximum Size of Private field 124 */
#define ISO8583_PVT_125_SIZE			50	/* Maximum Size of Private field 125 */
#define ISO8583_PVT_126_SIZE			32	/* Maximum Size of Private field 126 */
#define ISO8583_PVT_127_SIZE			32	/* Maximum Size of Private field 127 */

#endif  /* ISO8583_EXTENDED_BITMAP */
#endif  /* ISOSIZES_DEFINED */

